package com.woniu.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class UploadConfig implements WebMvcConfigurer {
    /**
     * 映射图片保存地址
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        System.out.println("配置文件已经生效");
            registry.addResourceHandler("/Stuimg/**").addResourceLocations("file:D:\\Stuimg\\");
    }

}
